<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page contentType="text/html; charset=utf-8" %>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>SideBar</title>
    <link rel="stylesheet" href="${resource(dir: 'css', file: 'frame.css')}" type="text/css">
</head>
<script language="JavaScript">
    function switchSideBar(){
        //兼容IE和FF
        var parentFrameSet = window.parent.document.getElementById('myFrame');
        if(parentFrameSet.cols == "199,7,*") {
            parentFrameSet.cols="0,7,*";
            document.getElementById("ImgArrow").src="${request.contextPath}/images/frame/switch_right.gif";
            document.getElementById("ImgArrow").alt="打开左侧导航栏";
        } else {
            parentFrameSet.cols="199,7,*";
            document.getElementById("ImgArrow").src="${request.contextPath}/images/frame/switch_left.gif";
            document.getElementById("ImgArrow").alt="隐藏左侧导航栏";
        }
    }

    function selfOnLoad() {
        if(window.parent.location.href.indexOf("MainUrl")>0) {
            var selfFrame = window.document.getElementById("sideBar");
            selfFrame.document.getElementById("ImgArrow").src="${request.contextPath}/images/frame/switch_right.gif";
        }
    }
</script>
<body onload="selfOnLoad()">
<div id="sideBarPic">
    <a href="javascript:switchSideBar()">
        <img src="${request.contextPath}/images/frame/switch_left.gif" alt="隐藏左侧导航栏" id="ImgArrow" />
    </a>
</div>
</body>
</html>
